<div class="page-wrapper d-flex flex-column pt-4">
    <div class="container-xl">
        <div class="page-header d-print-none">
            <div class="row align-items-center">
                <div class="col">
                    <div class="page-pretitle">
                        Listing
                    </div>
                    <h3 class="page-title">
                        All Languages & Cultures
                    </h3>
                </div>
            </div>
        </div>
    </div>
    <div class="page-body d-flex flex-row-reverse">
        <aside class="bd-sidebar sub-sidebar">
            <nav class="bd-links p-3" aria-label="Sub-section navigation">
                <div class="card">
                    <div class="card-body">
                        <a href="/portal/language/create" class="btn btn-primary text-white w-100 mb-3">
                            <em class="fas fa-plus"></em> Add language
                        </a>

                        <filter-list request="request" callback="getList(pageIndex)"></filter-list>
                    </div>
                </div>
            </nav>
        </aside>

        <!-- ----------------------------------------------------------- -->

        <div class="content-body py-3 pe-3">

            <div class="card mb-5">
                <div class="card-body">
                    <table class="table table-hover" cellspacing="0">
                        <thead class="thead-light">
                            <tr>
                                <th scope="col" width="5%">
                                    <!-- <small class="fa fa-grip-vertical fa-xs text-black-50 align-middle"></small> -->
                                </th>
                                <!-- <th scope="col" width="5%">
                        <span class="fa fa-grip-vertical fa-xs text-black-50-numeric-down"></span>
                    </th> -->
                                <th scope="col">Icon</th>
                                <th scope="col">Name</th>
                                <th scope="col">Alias</th>
                                <th scope="col">Specificulture</th>
                                <th scope="col" width="5%" class="text-end">Actions</th>
                            </tr>
                        </thead>

                        <tbody class="sortable" ng-init="getList()">
                            <tr ng-repeat="item in data.items track by $index" class="sortable-item"
                                sort-model="culture" sort-model-id="{{item.id}}">
                                <td style="cursor: grab" class="drag-header">
                                    <small class="fa fa-grip-vertical fa-xs text-black-50 align-middle"></small>
                                </td>
                                <!-- <td>
                        <input type="text" value="{{item.priority}}"
                            class="item-priority form-control form-control-sm d-inline" style="width:40px;">
                    </td> -->
                                <td>
                                    <span class="flag-icon {{item.icon}}"></span>
                                </td>
                                <td>{{item.fullName}}</td>
                                <td>{{item.alias}}</td>
                                <td>{{item.specificulture}}</td>
                                <td>
                                    <div class="btn-group btn-group-sm btn-group-sm float-end" role="group"
                                        aria-label="Actions">
                                        <!--<a ng-click="syncTemplates(item.id)" class="btn btn-sm btn-link d-inline-block "><span class="fas fa-sync-alt text-primary"></span></a>-->

                                        <a href="/portal/language/details/{{item.id}}" class="btn btn-link">
                                            <span class="fas fa-pen text-primary"></span>
                                        </a>
                                        <a ng-click="remove(item.id);" class="btn btn-link">
                                            <span class="fas fa-trash-alt text-danger"></span>
                                        </a>
                                    </div>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
                <div class="card-body">
                    <paging class="small" page="data.page" page-size="data.pageSize" total="data.totalItems"
                        ul-class="pagination justify-content-end m-0" a-class="page-link"
                        paging-action="$ctrl.loadPosts(page-1)" scroll-top="true">
                    </paging>
                </div>
            </div>
        </div>

    </div>
</div>